package jm.nj.day01mian.demo08;
/*
*测试子类继承父类之后,是否拥有父类的非私有成员
*
* 面向对象的三大特征:封装,继承,多态
*
* 继承的好处
*       1.可以提高代码的复用性
*       2.为多态提供了前提
*
*
* */
public class Demo {
    public static void main(String[] args) {
        Teacher t = new Teacher();
        //子类继承name
        t.name = "hhh";
        t.work();
        t.show();
        t.sleep();

        ZhuJiao zj = new ZhuJiao();
        zj.name = "jjj";
        zj.work();
    }
}
